Integrand size = 23, antiderivative size = 105 \[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=-\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}+\frac {4 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 a d} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2838, 2830, 2728, 212} \[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=-\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a \sin (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {2 \cos (c+d x) \sqrt {a \sin (c+d x)+a}}{3 a d}+\frac {4 \cos (c+d x)}{3 d \sqrt {a \sin (c+d x)+a}} \]
[In]
[Out]
Rule 212
Rule 2728
Rule 2830
Rule 2838
Rubi steps \begin{align*} \text {integral}& = -\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 a d}+\frac {2 \int \frac {\frac {a}{2}-a \sin (c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx}{3 a} \\ & = \frac {4 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 a d}+\int \frac {1}{\sqrt {a+a \sin (c+d x)}} \, dx \\ & = \frac {4 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 a d}-\frac {2 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d} \\ & = -\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}+\frac {4 \cos (c+d x)}{3 d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{3 a d} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.48 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.00 \[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=-\frac {\left ((-6-6 i) (-1)^{3/4} \text {arctanh}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (c+d x)\right )\right )\right )-2 \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{3 d \sqrt {a (1+\sin (c+d x))}} \]
[In]
[Out]
Time = 0.67 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.91
method | result | size |
default | \(-\frac {\left (1+\sin \left (d x +c \right )\right ) \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (3 a^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )-2 \left (a -a \sin \left (d x +c \right )\right )^{\frac {3}{2}}\right )}{3 a^{2} \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) | \(96\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 209 vs. \(2 (88) = 176\).
Time = 0.28 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.99 \[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=\frac {\frac {3 \, \sqrt {2} {\left (a \cos \left (d x + c\right ) + a \sin \left (d x + c\right ) + a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) - \frac {2 \, \sqrt {2} \sqrt {a \sin \left (d x + c\right ) + a} {\left (\cos \left (d x + c\right ) - \sin \left (d x + c\right ) + 1\right )}}{\sqrt {a}} + 3 \, \cos \left (d x + c\right ) + 2}{\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 2}\right )}{\sqrt {a}} - 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 2\right )} \sqrt {a \sin \left (d x + c\right ) + a}}{6 \, {\left (a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d\right )}} \]
[In]
[Out]
\[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=\int \frac {\sin ^{2}{\left (c + d x \right )}}{\sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=\int { \frac {\sin \left (d x + c\right )^{2}}{\sqrt {a \sin \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.15 \[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=-\frac {\frac {8 \, \sqrt {2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {3 \, \sqrt {2} \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} + \frac {3 \, \sqrt {2} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{6 \, d} \]
[In]
[Out]
Timed out. \[ \int \frac {\sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx=\int \frac {{\sin \left (c+d\,x\right )}^2}{\sqrt {a+a\,\sin \left (c+d\,x\right )}} \,d x \]
[In]
[Out]